package team119;

import battlecode.common.Clock;
import battlecode.common.GameActionException;
import battlecode.common.GameConstants;
import battlecode.common.RobotController;

public class BOTSoldier implements BOT
{
	public void RunBot(RobotController rc) throws GameActionException
	{
		while (true) 
		{
			if (rc.getTeamPower() > GameConstants.UNIT_POWER_UPKEEP*10) {
				try {
					if(instanceVariables.isDefensiveRobot && Clock.getRoundNum() < 500)
					{
						DefenseSoldierMovement.RunBot(rc, instanceVariables);
					
					}
					else {
						SoldierMovement.PerformMovement(rc,instanceVariables);
					}
				} catch (Exception ex) {
					ex.printStackTrace();
				}
			} else {
				rc.yield();
			}
		}
	}

	
	
}
